import request from '@/utils/request'

// 查询蓝牙设备列表
export function listDevice(query) {
  return request({
    url: '/yiluzhilian/device/list',
    method: 'get',
    params: query
  })
}

// 查询蓝牙设备详细
export function getDevice(id) {
  return request({
    url: '/yiluzhilian/device/' + id,
    method: 'get'
  })
}

// 新增蓝牙设备
export function addDevice(data) {
  return request({
    url: '/yiluzhilian/device',
    method: 'post',
    data: data
  })
}

// 修改蓝牙设备
export function updateDevice(data) {
  return request({
    url: '/yiluzhilian/device',
    method: 'put',
    data: data
  })
}

// 删除蓝牙设备
export function delDevice(id) {
  return request({
    url: '/yiluzhilian/device/' + id,
    method: 'delete'
  })
}

//检查是否可以删除数据
export function checkIsExist(id) {
  return request({
    url: '/yiluzhilian/fingerprint/checkByDeviceId/' + id,
    method: 'get'
  })
}
